From: Alban Browaeys Date: Thu, 25 Apr 2013 16:25:12 +0000 (+0200) Subject: st-icon: check if gicon is null before unref. X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4251 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e96d9e0ea1bb4043012890b0cdb69fbf2b7bc911;p=gnome-shell.git st-icon: check if gicon is null before unref. Commit a6b49fe7d6c9bcd8a2be47a0b0b44cf9a53a45aa introduced a check for equality of priv->gicon vs gicon and unref then return early if so. But if both are null, we should not unref gicon. Only return. https://bugzilla.gnome.org/show_bug.cgi?id=698863 --- diff --git a/src/st/st-icon.c b/src/st/st-icon.c index b29744b64..3fec7e2a2 100644 --- a/src/st/st-icon.c +++ b/src/st/st-icon.c @@ -544,7 +544,8 @@ st_icon_set_icon_name (StIcon *icon, if (g_icon_equal (priv->gicon, gicon)) /* do nothing */ { - g_object_unref (gicon); + if (gicon) + g_object_unref (gicon); return; }